package com.skyrhyme.market.controller;

import cn.hutool.http.HttpUtil;
import com.skyrhyme.market.service.MarketEasyTestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/skyrhyme/market/test")
public class MarketEasyTestController {
    @Autowired
    private MarketEasyTestService marketEasyTestService;

    @PostMapping("/queryViewChart")
    public String templateQuery() {
//        marketEasyTestService.templateQuery();

        String post = HttpUtil.post("http://gw-openapi.youpin898.com/open/v1/api/queryViewChart",
                "{\n" +
                        "  \"sign\":\"vESfGNQbhvQ9AufeC8UM4F+HTc4iZ7wFow8r6FDjtRBuf38etLXpEb8K5L14qzSvSM28bgDnbNMTBfprT8f7TyBtvrAp7ODKdFJDwJ/TjuqCrIGptLNOXu+CLXQnXgd6Gn0+KPBNqKLNm6aWd0zI0YSdsqv0j/D1A7QItt63IZFDqSxiOXZeArNLZSKGKBiab5EHWi93BYkQsCR3lIrJvsVHIQkNPhaA+sYhbqYNaZYLok5tHvBBznGOye6nvWyaqi+6qk8Jtxb3F1rDQpozVgrpnexuesfdCM7QSboBBsONZkanIPAYLym/gibuKYSrGb90T0mPn+okNzPk0E59nA==\",\n" +
                        "  \"timestamp\":\"2025-09-08 17:59:00\",\n" +
                        "  \"appKey\":\"4775098\",\n" +
                        "  \"commodityIds\": [34973]\n" +
                        "}");
        return post;
    }


}
